import Vue from 'vue';

const vm = new Vue()

// 学者圈
function enventList (params) {
	return vm.$http.post('/apistore/scholar/scholarList',params);
}
// 点赞
function enventPraise (params) {
	return vm.$http.post('/news/praise/praise/v1',params);
}
// 详情
function enventDetails (params) {
	return vm.$http.post('/apistore/scholar/enventDetails',params);
}
// 点赞
function commentDetails (params) {
	return vm.$http.post('/apistore/scholar/commentDetails',params);
}
// 个人主页
function enventSpace (params) {
	return vm.$http.post('/apistore/scholar/mySpaceList',params);
}
// 个人信息
function userList (params) {
	return vm.$http.post('/user/userDetail',params);
}

// 聊天人物列表
function listReadStatus (params) {
	return vm.$http.post('/common/chatRecordHelp/scholar/listReadStatus',params);
}

// 聊天内容
function listChat (params) {
	return vm.$http.post('/common/chatRecordHelp/scholar/listChat',params);
}

// 个人信息
function userId (params) {
	return vm.$http.post('/user/list/v1',params);
}

// 删除动态
function del (params) {
	return vm.$http.post('/scholar/envents/del',params);
}

// 聊天信息数量
function unReadCount (params) {
	return vm.$http.post('/common/chatRecordHelp/scholar/unReadCount',params);
}

// 上传图片
function upload (params) {
    return vm.$http.post('/scholar/envents/upload',params);
}

// 删除封面图片
function deletePicture (params) {
    return vm.$http.post('/common/edoc/remove/file',params);
}

// 文章发布接口
function publishArticle (params) {
    return vm.$http.post('/scholar/envents/add/literary',params);
}

// 取消关注一条
function hide (params) {
    return vm.$http.post('/scholar/envents/hide',params);
}

// 动态详情页点赞获取人物头像
function praise (params) {
    return vm.$http.post('/user/data/find/praise',params);
}
// 跟换头图
function headImage (params) {
    return vm.$http.post('/user/edit/headImage',params);
}
export default {
    enventList,
    enventPraise,
    enventDetails,
    commentDetails,
    enventSpace,
    userList,
    listReadStatus,
    listChat,
    userId,
    del,
    unReadCount,
    upload,
    deletePicture,
    publishArticle,
    hide,
    praise,
    headImage
};